package com.qiusuo0226.core.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableCharset;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableEngine;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.qiusuo0226.core.constant.Tables;
import com.qiusuo0226.mysql.pojo.CommonEntity;
import lombok.*;

import java.io.Serializable;

/**
 * @author qiusuo
 * @date 2023/7/23 21:30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = Tables.CORE_DICTIONARY)
@Table(name = Tables.CORE_DICTIONARY, comment = "核心模块：字典表")
@TableCharset(MySqlCharsetConstant.UTF8MB4)
@TableEngine(MySqlEngineConstant.InnoDB)
public class DictionaryDO extends CommonEntity implements Serializable {

    private static final long serialVersionUID = -198633506961358304L;

    @TableField(value = "group_name")
    @Column(name = "group_name", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "字典组名", defaultValue = "", isNull=false)
    private String groupName;

    @TableField(value = "group_code")
    @Column(name = "group_code", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "字典组值", defaultValue = "", isNull=false)
    private String groupCode;

    @TableField(value = "dictionary_name")
    @Column(name = "dictionary_name", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "字典名", defaultValue = "", isNull=false)
    private String dictionaryName;

    @TableField(value = "dictionary_code")
    @Column(name = "dictionary_code", type = MySqlTypeConstant.VARCHAR, length = 100, comment = "字典值", defaultValue = "", isNull=false)
    private String dictionaryCode;

    @TableField(value = "sort")
    @Column(name = "sort", type = MySqlTypeConstant.INT, length = 11, comment = "字典在字典组中的排序", defaultValue = "9999", isNull=false)
    private Integer sort;
}
